
#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <Chance.h>

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(Chance)
{
	TEST(Should be able to compare two chances: chance(0.2) == chance(0.2))
	{
		Chance chanceA(0.2);
		Chance chanceB(0.2);
		ASSERT_TRUE(chanceA == chanceB);
	}

	TEST(Should be able to revert a chance: chance(0.2) == !chance(0.8) )
	{
		Chance chanceA(0.2);
		Chance chanceB(0.8);
		ASSERT_TRUE(chanceB == !chanceA);
	} 

	TEST(Should be able to ADD two chances: chance(0.2) + chance(0.3) = chance(0.5))
	{
		Chance chanceA(0.2);
		Chance chanceB(0.3);
		Chance chanceExpected(0.5);
		ASSERT_TRUE(chanceExpected == (chanceA+chanceB));
	} 

	TEST(Should be able to AND two chances: chance(0.2) * chance(0.3) = chance(0.06))
	{
		Chance chanceA(0.2);
		Chance chanceB(0.3);
		Chance chanceExpected(0.06);
		ASSERT_TRUE(chanceExpected == (chanceA*chanceB));
	} 

	

};

